package com.sdry.service.impl.permission;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sdry.entity.permission.UpmsPermission;
import com.sdry.mapper.permission.UpmsPermissionMapper;
import com.sdry.service.permission.UpmsPermissionService;

/**
 * 
 * @ClassName:UpmsPermissionServiceImpl
 * @Description:权限实现
 * @Author tdd
 * @Date 2018年7月30日下午2:34:58
 * @version 1.0
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UpmsPermissionServiceImpl  implements UpmsPermissionService {

	/**注入权限Mapper*/
    @Resource UpmsPermissionMapper  upmsPermissionMapper;
    /**
     * 根据主键拼接的字符串删除 权限返回影响行数
    */
    public Integer delete(String ids) {
        return upmsPermissionMapper.delete(ids);
    }
    /**
     * 条件分页查询权限
    */
    public List<UpmsPermission> findPageByMution(UpmsPermission upmsPermission){
        return upmsPermissionMapper.findPageByMution(upmsPermission);
    }
    /**
     * 插入返回权限id
    */
    public Long insert(UpmsPermission upmsPermission){
        return upmsPermissionMapper.insert(upmsPermission);
    }
    /**
     * 条件查询权限
    */
    public List<UpmsPermission> queryAllByMution(UpmsPermission upmsPermission){
        return upmsPermissionMapper.queryAllByMution(upmsPermission);
    }
    /**
     * 根据id查询权限
    */
    public UpmsPermission queryById(Long id){
        return upmsPermissionMapper.queryById(id);
    }
    /**
     * 条件查询权限总条数
    */
    public Integer selectCountByMution(UpmsPermission upmsPermission){
        return upmsPermissionMapper.selectCountByMution(upmsPermission);
    }
    /**
     * 根据主键更新 权限返回影响行数
    */
    public Integer update(UpmsPermission upmsPermission){
        return upmsPermissionMapper.update(upmsPermission);
    }

}